﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace CodeGenerator.Core
{
    /// <summary>
    /// 数据库类型枚举值
    /// </summary>
    public enum DatabaseType
    {
        SqlServer,
        PostgreSQL,
        MySql,
        Sqlite,
        Oracle
    }

    public enum ControlType
    {
        [Description("单行文本")]
        Text,
        [Description("多行文本")]
        TextArea,
        [Description("日期类型")]
        DateTime,
        [Description("数值类型")]
        Numeric,
        [Description("下拉列表")]
        Select,
        [Description("复选框")]
        CheckBox
    }

    /// <summary>
    /// 生成代码类型
    /// </summary>
    public enum CodeType
    {
        NET,
        Java
    }

    /// <summary>
    /// 树节点类型
    /// </summary>
    public enum TreeNodeType
    {
        Server,
        DataBase,
        TableNode, 
        ViewNode,
        Table,
        View,
        Field 
    }

    /// <summary>
    /// 文件类型
    /// </summary>
    public enum FileType
    {
        cs,
        java,
        sql,
        txt,
        html,
        cshtml,
        jsp,
        empty
    }

    public enum FileOperateType
    {
        /// <summary>
        /// 添加文件夹
        /// </summary>
        AddDirection,
        /// <summary>
        /// 添加文件
        /// </summary>
        AddFile,
        /// <summary>
        /// 文件重命名
        /// </summary>
        Rename
    }

    /// <summary>
    /// 数据字典生成类型
    /// </summary>
    public enum BuilderDictType
    {
        Excel,
        Html,
        Word,
        Chm
    }

    /// <summary>
    /// 程序生成方式
    /// </summary>
    public enum BuilderType
    {
        /// <summary>
        /// 常规模式
        /// </summary>
        Default,
        /// <summary>
        /// 工厂模式
        /// </summary>
        Factory
    }

    /// <summary>
    /// 生成方法
    /// </summary>
    public enum BuilderMethods
    {
        /// <summary>
        /// 增加
        /// </summary>
        Add,
        /// <summary>
        /// 修改
        /// </summary>
        Update,
        /// <summary>
        /// 删除
        /// </summary>
        Delete,
        /// <summary>
        /// 查询所有记录
        /// </summary>
        SelectAll,
        /// <summary>
        /// 查询主键记录
        /// </summary>
        SelectByKey,
        /// <summary>
        /// 判断记录是否存在
        /// </summary>
        Exists,
        /// <summary>
        /// 查询记录总数
        /// </summary>
        Count
    }
}
